<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    class Person{
      constructor(name,sex){
        this.name=name
        this.sex=sex
        this.say=function(){
          console.log('say');
        }
      }
      speak(){
        console.log('speak');
      }
      static speak(){
        console.log('static speak');
      }
    }
    Person.version="1.0"
    class Programmer extends Person{
      constructor(name,sex,feature){
        //this操作不能放在super前面
        super(name,sex)
        this.feature=feature
      }
      //同名覆盖
      speak(){
        console.log('Programmer speak');
      }
      static static(){
        console.log('Programmer static speak');
      }
    }
    Programmer.version='2.0'  
    const zs=new Programmer('zs','男')
    zs.say()
    zs.speak()
    Programmer.speak()

  </script>
</body>
</html>